package yicheng.dinnertogetherapp;

import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;

public class PersonalPrefBackPressedEditText extends EditText {

	// private KeyImeChange keyImeChangeListener;

	    public PersonalPrefBackPressedEditText(Context context, AttributeSet attrs){
	        super(context, attrs);
	    }

	 

	

	    @Override
	    public boolean onKeyPreIme (int keyCode, KeyEvent event){
	    	if (keyCode == KeyEvent.KEYCODE_BACK && 
	    	        event.getAction() == KeyEvent.ACTION_UP) {
	    		
	    		MyInfoActivity.preference_editText.setCursorVisible(false);
	    		MyInfoActivity.updatePreferenceDisplay();	    		
	    	            return false;
	    	    }
	    	    return super.dispatchKeyEvent(event);
	    }
}
